package cn.aitrox.ry.service.anno.dao;

import cn.aitrox.ry.common.dao.BaseDao;
import cn.aitrox.ry.service.anno.entity.TaskEntity;
import cn.aitrox.ry.service.anno.entity.UserTaskEntity;
import cn.aitrox.ry.service.anno.po.user.task.UserTaskFindCondPo;
import com.github.pagehelper.PageInfo;

import java.util.List;

public interface UserTaskDao extends BaseDao<UserTaskEntity> {
    List<UserTaskEntity> findByUserIdStatus(Integer userId, Integer... status);

    PageInfo<TaskEntity> searchTaskByCustom(Integer page, Integer pageSize, UserTaskFindCondPo cond);

    void batchSave(List<UserTaskEntity> list);

    UserTaskEntity findByUserIdTaskId(Integer userId, Integer taskId);

    List<UserTaskEntity> findByUserIdTaskIds(Integer userId, List<Integer> taskIds);

    void terminate(Integer taskId);
}
